package com.cxy.datawarehouse.service;

import com.cxy.datawarehouse.entity.StandardCodeType;
import com.cxy.datawarehouse.mapper.StandardCodeTypeMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Optional;

@Slf4j
@Service
public class StandardCodeTypeService {
    @Resource
    private StandardCodeTypeMapper standardCodeTypeMapper;

    public List<StandardCodeType> list() {
        return standardCodeTypeMapper.findAll();
    }

    public void create(StandardCodeType standardCodeType){
        standardCodeTypeMapper.save(standardCodeType);
    }

    public void deleteById(Long id){
        standardCodeTypeMapper.deleteById(id);
    }

    public void update(StandardCodeType standardCodeType){
        standardCodeTypeMapper.save(standardCodeType);
    }
}
